Session Callbacks Structure
When you create an instantiation of the Java runtime environment usingJMOpenSession
, you must pass a data structure that supplies callback information for that instantiation. The session callbacks data structure is defined by theJMSessionCallbacks
data type.
struct JMSessionCallbacks { UInt32 fVersion; /* set to kJMVersion */ JMConsoleProcPtr fStandardOutput;/* standard output */ JMConsoleProcPtr fStandardError;/* standard error */ JMConsoleReadProcPtr fStandardIn;/* standard input */ };
Field Description
fVersion
- The version of JManager. You should set this field to
kJMVersion
.fStandardOutput
- A pointer to a function that handles text sent to the standard output. JManager sends all console output to this function. This callback has the following type definition:
typedef void (*JMConsoleProcPtr) ( JMSessionRef session, const char* message, UInt32 messageLen);
- For more information, see the description of the application-defined function
MyStandardOutput
(page 60).fStandardError
- A pointer to a function that handles standard error output. JManager sends any error messages to this function. This callback has the following type definition:
typedef void (*JMConsoleProcPtr) ( JMSessionRef session, const char* message, UInt32 messageLen);
- For more information, see the description of the application-defined function
MyStandardError
(page 60).fStandardIn
- A pointer to a function that handles console input. JManager accepts input from this routine. This value can be a null pointer, which indicates default behavior (no console input). This callback has the following type definition:
typedef SInt32 (*JMConsoleReadProcPtr) ( JMSessionRef session, char* buffer, SInt32 maxBufferLength);
- For more information, see the description of the application-defined function
MyStandardIn
(page 61).
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help